load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "component_metrics.go",
        "leader_metrics.go",
        "metrics.go",
        "migration_metrics.go",
        "migrationstats_collector.go",
        "perfscale_metrics.go",
        "vmi_metrics.go",
        "vmistats_collector.go",
        "vmsnapshot.go",
        "vmstats_collector.go",
    ],
    importpath = "kubevirt.io/kubevirt/pkg/monitoring/metrics/virt-controller",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/controller:go_default_library",
        "//pkg/instancetype/apply:go_default_library",
        "//pkg/instancetype/find:go_default_library",
        "//pkg/instancetype/preference/find:go_default_library",
        "//pkg/monitoring/metrics/common/client:go_default_library",
        "//pkg/monitoring/metrics/common/labels:go_default_library",
        "//pkg/monitoring/metrics/common/workqueue:go_default_library",
        "//pkg/util/migrations:go_default_library",
        "//pkg/virt-config:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/instancetype:go_default_library",
        "//staging/src/kubevirt.io/api/snapshot/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//staging/src/kubevirt.io/client-go/log:go_default_library",
        "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
        "//vendor/github.com/prometheus/client_model/go:go_default_library",
        "//vendor/github.com/rhobs/operator-observability-toolkit/pkg/operatormetrics:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "migration_metrics_test.go",
        "migrationstats_collector_test.go",
        "perfscale_metrics_test.go",
        "virt_controller_suite_test.go",
        "vmi_metrics_test.go",
        "vmistats_collector_test.go",
        "vmsnapshot_test.go",
        "vmstats_collector_test.go",
    ],
    embed = [":go_default_library"],
    race = "on",
    deps = [
        "//pkg/controller:go_default_library",
        "//pkg/instancetype/apply:go_default_library",
        "//pkg/instancetype/find:go_default_library",
        "//pkg/instancetype/preference/find:go_default_library",
        "//pkg/pointer:go_default_library",
        "//pkg/testutils:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/instancetype/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/snapshot/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/client-go/testutils:go_default_library",
        "//vendor/github.com/onsi/ginkgo/v2:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
        "//vendor/github.com/rhobs/operator-observability-toolkit/pkg/operatormetrics:go_default_library",
        "//vendor/k8s.io/api/apps/v1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1:go_default_library",
    ],
)
